function cmpPolarAngle(x1, y1, x2, y2 : int64) : longint;

	function q(x, y : int64) : longint;
	begin
		if x >= 0 then
			if y >= 0 then result := 1 else result := 4 
		else
			if y >= 0 then result := 2 else result := 3;
	end;

var
	k, t1, t2 : int64;

begin
	t1 := q(x1, y1);
	t2 := q(x2, y2);
	if t1 > t2 then result := 1 else
	if t1 < t2 then result := -1 else begin
		k := x1 * y2 - x2 * y1;
		if k > 0 then result := -1 else result := byte(k < 0);
	end;
end;	